home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-18 | 1.0 KB | 57 lines | [TEXT/PJMM] |
- { Test dialogs main program. }
-
- { Written by Thomas Engel, M.D. }
- { Copyright © 1991 MacTutor. }
-
-
- {$I-}
- program TestDialogs;
-
- uses
- Globals, TDialog;
-
- var
- theButton: Integer;
- response: Str255;
- fontSize: Integer;
- margins: MarginRecord;
- confirmed: Boolean;
-
- begin
-
- { Initialize system. }
-
- MaxApplZone;
- MoreMasters;
- InitGraf(@thePort);
- InitFonts;
- InitWindows;
- InitMenus;
- TEInit;
- InitDialogs(nil);
- InitCursor;
- FlushEvents(EveryEvent, 0);
- IBeam := GetCursor(IBeamID);
- Watch := GetCursor(WatchID);
-
- { Test each dialog. }
-
- ShowAbout;
- ShowMessage('This is a message.');
-
- theButton := YesNoDialog('This is the prompt. (Yes)', YesButton);
- theButton := YesNoCancelDialog('This is the prompt. (Cancel)', CancelButton);
-
- response := 'This is the default text.';
- confirmed := StringDialog('This is the prompt.', response);
-
- fontSize := 12;
- confirmed := FontSizeDialog(fontSize);
-
- margins.measure := inches;
- margins.top := 1.0;
- margins.bottom := 1.5;
- margins.left := 1.25;
- margins.right := 1.25;
- confirmed := MarginsDialog(margins);
- end.